
import 'package:flutter/material.dart';
import 'package:flutter_deer/game/models/game_item_entity.dart';
import 'package:flutter_deer/widgets/state_layout.dart';

class GameSearchListProvider extends ChangeNotifier {

  List<GameItemEntity>? _list = [];
  StateType? _stateType = StateType.loading;

  List<GameItemEntity>? get list => _list;
  StateType? get stateType => _stateType;

  void setGameItems(List<GameItemEntity>? items){
    this._list = items;
    this._stateType = StateType.takeOut;
    notifyListeners();
  }

  void setLoading(){
    this._stateType = StateType.loading;
    notifyListeners();
  }
}